package num11;

import java.util.List;

public class Leecode206 {
    public class ListNode{
        public int value;
        public ListNode next;
        ListNode(){

        }
          ListNode(int value){
            this.value= value;
        }
        ListNode(int value,ListNode next){
            this.value= value;
            this.next = next;
        }
    }
    public ListNode reverseList(ListNode head) {
        //虚拟的头节点
        ListNode prev = null;
        //当前交换的节点
        ListNode curr = head;
        while (curr != null){
            //用来记录下一次要交换时的当前元素
            ListNode next = curr.next;
            curr.next = prev;
            prev = curr;
            curr = next;




        }
        return null;

    }
}
